Field of the Invention
The present invention relates to an image processing apparatus and an image processing method.
Description of the Related Art
Processing an image may include calculation of a pixel value of a pixel in a position to be output (pixel of interest). Such image processing may sometimes need pixels values of the pixel of interest and a plurality of peripheral pixels. For example, 3×3 median filter processing needs the pixel values of one or more peripheral pixels on each of the top, bottom, right, and left (in such an example, eight peripheral pixels) of a pixel of interest (in such an example, a pixel in the center). When the image processing needing peripheral pixels is performed with an image end as a pixel of interest, as many dummy pixels as necessary are added to the input image as peripheral pixels, or the filter processing fails to provide a favorable output value.
Japanese Laid-Open Patent Application No. 2000-354168 discusses that when filter processes are combined, the amounts of peripheral pixels needed for respective image processing modules in a vertical direction and a horizontal direction are added to determine the amounts of peripheral pixels to be added to an input image.
Japanese Laid-Open Patent Application No. 7-325800 discusses a method for connecting processing circuits using a ring-shaped bus (ring bus). According to such a method, when a plurality of processing circuits performs pipeline processing, the processing circuits can be permutated in a processing order.
The technique discussed in Japanese Laid-Open Patent Application No. 2000-354168 is difficult to simply apply to the technique discussed in Japanese Laid-Open Patent Application No. 7-325800. More specifically, the amounts of peripheral pixels to be added to an input image are difficult to efficiently determine by simply adding the numbers of peripheral pixels needed for the respective image processing modules by the technique discussed in Japanese Laid-Open Patent Application No. 2000-354168. The reason is that if a ring bus like that discussed in Japanese Laid-Open Patent Application No. 7-325800 is used to configure the image processing modules so that the processing order can be changed, the numbers of peripheral pixels to be added vary depending on whether a scaling (enlargement or reduction) module and/or a module having a restriction about units of processing is/are used before or after an image processing module that uses peripheral pixels.